<!DOCTYPE HTML>

<html lang="en">
<head>

<title>DefaultLdapAuthoritiesPopulator (spring-security-docs 5.6.3 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="DefaultLdapAuthoritiesPopulator (spring-security-docs 5.6.3 API)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">

<div class="topNav"><a id="navbar.top">

</a>
<div class="skipNav"><a href="DefaultLdapAuthoritiesPopulator.html#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">

</a></div>

</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>

<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.springframework.security.ldap.userdetails</a></div>
<h2 title="Class DefaultLdapAuthoritiesPopulator" class="title">Class DefaultLdapAuthoritiesPopulator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="LdapAuthoritiesPopulator.html" title="interface in org.springframework.security.ldap.userdetails">LdapAuthoritiesPopulator</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="NestedLdapAuthoritiesPopulator.html" title="class in org.springframework.security.ldap.userdetails">NestedLdapAuthoritiesPopulator</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">DefaultLdapAuthoritiesPopulator</span>
extends java.lang.Object
implements <a href="LdapAuthoritiesPopulator.html" title="interface in org.springframework.security.ldap.userdetails">LdapAuthoritiesPopulator</a></pre>
<div class="block">The default strategy for obtaining user role information from the directory.
<p>
It obtains roles by performing a search for "groups" the user is a member of.
<p>
A typical group search scenario would be where each group/role is specified using the
<tt>groupOfNames</tt> (or <tt>groupOfUniqueNames</tt>) LDAP objectClass and the user's
DN is listed in the <tt>member</tt> (or <tt>uniqueMember</tt>) attribute to indicate
that they should be assigned that role. The following LDIF sample has the groups stored
under the DN <tt>ou=groups,dc=springframework,dc=org</tt> and a group called
"developers" with "ben" and "luke" as members:
<pre> dn: ou=groups,dc=springframework,dc=org
 objectClass: top
 objectClass: organizationalUnit
 ou: groups

 dn: cn=developers,ou=groups,dc=springframework,dc=org
 objectClass: groupOfNames
 objectClass: top
 cn: developers
 description: Spring Security Developers
 member: uid=ben,ou=people,dc=springframework,dc=org
 member: uid=luke,ou=people,dc=springframework,dc=org
 ou: developer
 </pre>
<p>
The group search is performed within a DN specified by the <tt>groupSearchBase</tt>
property, which should be relative to the root DN of its <tt>ContextSource</tt>. If the
search base is null, group searching is disabled. The filter used in the search is
defined by the <tt>groupSearchFilter</tt> property, with the filter argument {0} being
the full DN of the user. You can also optionally use the parameter {1}, which will be
substituted with the username. You can also specify which attribute defines the role
name by setting the <tt>groupRoleAttribute</tt> property (the default is "cn").
<p>
The configuration below shows how the group search might be performed with the above
schema.
<pre> &lt;bean id="ldapAuthoritiesPopulator"
       class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator"&gt;
   &lt;constructor-arg ref="contextSource"/&gt;
   &lt;constructor-arg value="ou=groups"/&gt;
   &lt;property name="groupRoleAttribute" value="ou"/&gt;
 &lt;!-- the following properties are shown with their default values --&gt;
   &lt;property name="searchSubtree" value="false"/&gt;
   &lt;property name="rolePrefix" value="ROLE_"/&gt;
   &lt;property name="convertToUpperCase" value="true"/&gt;
 &lt;/bean&gt;
 </pre>
A search for roles for user "uid=ben,ou=people,dc=springframework,dc=org" would return
the single granted authority "ROLE_DEVELOPER".
<p>
The single-level search is performed by default. Setting the <tt>searchSubTree</tt>
property to true will enable a search of the entire subtree under
<tt>groupSearchBase</tt>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">

</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#%3Cinit%3E(org.springframework.ldap.core.ContextSource,java.lang.String)">DefaultLdapAuthoritiesPopulator</a></span>&#8203;(org.springframework.ldap.core.ContextSource&nbsp;contextSource,
java.lang.String&nbsp;groupSearchBase)</code></th>
<td class="colLast">
<div class="block">Constructor for group search scenarios.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">

</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected java.util.Set&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getAdditionalRoles(org.springframework.ldap.core.DirContextOperations,java.lang.String)">getAdditionalRoles</a></span>&#8203;(org.springframework.ldap.core.DirContextOperations&nbsp;user,
java.lang.String&nbsp;username)</code></th>
<td class="colLast">
<div class="block">This method should be overridden if required to obtain any additional roles for the
given user (on top of those obtained from the standard search implemented by this
class).</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected org.springframework.ldap.core.ContextSource</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getContextSource()">getContextSource</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations,java.lang.String)">getGrantedAuthorities</a></span>&#8203;(org.springframework.ldap.core.DirContextOperations&nbsp;user,
java.lang.String&nbsp;username)</code></th>
<td class="colLast">
<div class="block">Obtains the authorities for the user who's directory entry is represented by the
supplied LdapUserDetails object.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.Set&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getGroupMembershipRoles(java.lang.String,java.lang.String)">getGroupMembershipRoles</a></span>&#8203;(java.lang.String&nbsp;userDn,
java.lang.String&nbsp;username)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getGroupRoleAttribute()">getGroupRoleAttribute</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the attribute name of the LDAP attribute that will be mapped to the role
name Method available so that classes extending this can override</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getGroupSearchBase()">getGroupSearchBase</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getGroupSearchFilter()">getGroupSearchFilter</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the search filter configured for this populator Method available so that
classes extending this can override</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected <a href="../SpringSecurityLdapTemplate.html" title="class in org.springframework.security.ldap">SpringSecurityLdapTemplate</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getLdapTemplate()">getLdapTemplate</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the current LDAP template.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#getRolePrefix()">getRolePrefix</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the role prefix used by this populator Method available so that classes
extending this can override</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#isConvertToUpperCase()">isConvertToUpperCase</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if role names are converted to uppercase Method available so that
classes extending this can override</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setAuthorityMapper(java.util.function.Function)">setAuthorityMapper</a></span>&#8203;(java.util.function.Function&lt;java.util.Map&lt;java.lang.String,&#8203;java.util.List&lt;java.lang.String&gt;&gt;,&#8203;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;authorityMapper)</code></th>
<td class="colLast">
<div class="block">Sets the mapping function which will be used to create instances of
<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core"><code>GrantedAuthority</code></a> given the context record.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setConvertToUpperCase(boolean)">setConvertToUpperCase</a></span>&#8203;(boolean&nbsp;convertToUpperCase)</code></th>
<td class="colLast">
<div class="block">Convert the role to uppercase</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setDefaultRole(java.lang.String)">setDefaultRole</a></span>&#8203;(java.lang.String&nbsp;defaultRole)</code></th>
<td class="colLast">
<div class="block">The default role which will be assigned to all users.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setGroupRoleAttribute(java.lang.String)">setGroupRoleAttribute</a></span>&#8203;(java.lang.String&nbsp;groupRoleAttribute)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setGroupSearchFilter(java.lang.String)">setGroupSearchFilter</a></span>&#8203;(java.lang.String&nbsp;groupSearchFilter)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setIgnorePartialResultException(boolean)">setIgnorePartialResultException</a></span>&#8203;(boolean&nbsp;ignore)</code></th>
<td class="colLast">
<div class="block">Sets the corresponding property on the underlying template, avoiding specific
issues with Active Directory.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setRolePrefix(java.lang.String)">setRolePrefix</a></span>&#8203;(java.lang.String&nbsp;rolePrefix)</code></th>
<td class="colLast">
<div class="block">Sets the prefix which will be prepended to the values loaded from the directory.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DefaultLdapAuthoritiesPopulator.html#setSearchSubtree(boolean)">setSearchSubtree</a></span>&#8203;(boolean&nbsp;searchSubtree)</code></th>
<td class="colLast">
<div class="block">If set to true, a subtree scope search will be performed.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">

</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">

</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(org.springframework.ldap.core.ContextSource,java.lang.String)">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DefaultLdapAuthoritiesPopulator</h4>
<pre>public&nbsp;DefaultLdapAuthoritiesPopulator&#8203;(org.springframework.ldap.core.ContextSource&nbsp;contextSource,
                                       java.lang.String&nbsp;groupSearchBase)</pre>
<div class="block">Constructor for group search scenarios. <tt>userRoleAttributes</tt> may still be
set as a property.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>contextSource</code> - supplies the contexts used to search for user roles.</dd>
<dd><code>groupSearchBase</code> - if this is an empty string the search will be performed from
the root DN of the context factory. If null, no search will be performed.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>

<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">

</a>
<h3>Method Detail</h3>
<a id="getAdditionalRoles(org.springframework.ldap.core.DirContextOperations,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getAdditionalRoles</h4>
<pre class="methodSignature">protected&nbsp;java.util.Set&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;getAdditionalRoles&#8203;(org.springframework.ldap.core.DirContextOperations&nbsp;user,
                                                             java.lang.String&nbsp;username)</pre>
<div class="block">This method should be overridden if required to obtain any additional roles for the
given user (on top of those obtained from the standard search implemented by this
class).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>user</code> - the context representing the user who's roles are required</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the extra roles which will be merged with those returned by the group
search</dd>
</dl>
</li>
</ul>
<a id="getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getGrantedAuthorities</h4>
<pre class="methodSignature">public final&nbsp;java.util.Collection&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;getGrantedAuthorities&#8203;(org.springframework.ldap.core.DirContextOperations&nbsp;user,
                                                                          java.lang.String&nbsp;username)</pre>
<div class="block">Obtains the authorities for the user who's directory entry is represented by the
supplied LdapUserDetails object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="LdapAuthoritiesPopulator.html#getGrantedAuthorities(org.springframework.ldap.core.DirContextOperations,java.lang.String)">getGrantedAuthorities</a></code>&nbsp;in interface&nbsp;<code><a href="LdapAuthoritiesPopulator.html" title="interface in org.springframework.security.ldap.userdetails">LdapAuthoritiesPopulator</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>user</code> - the user who's authorities are required</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the set of roles granted to the user.</dd>
</dl>
</li>
</ul>
<a id="getGroupMembershipRoles(java.lang.String,java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroupMembershipRoles</h4>
<pre class="methodSignature">public&nbsp;java.util.Set&lt;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;getGroupMembershipRoles&#8203;(java.lang.String&nbsp;userDn,
                                                               java.lang.String&nbsp;username)</pre>
</li>
</ul>
<a id="getContextSource()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getContextSource</h4>
<pre class="methodSignature">protected&nbsp;org.springframework.ldap.core.ContextSource&nbsp;getContextSource()</pre>
</li>
</ul>
<a id="getGroupSearchBase()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroupSearchBase</h4>
<pre class="methodSignature">protected&nbsp;java.lang.String&nbsp;getGroupSearchBase()</pre>
</li>
</ul>
<a id="setConvertToUpperCase(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setConvertToUpperCase</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setConvertToUpperCase&#8203;(boolean&nbsp;convertToUpperCase)</pre>
<div class="block">Convert the role to uppercase</div>
</li>
</ul>
<a id="setDefaultRole(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultRole</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setDefaultRole&#8203;(java.lang.String&nbsp;defaultRole)</pre>
<div class="block">The default role which will be assigned to all users.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>defaultRole</code> - the role name, including any desired prefix.</dd>
</dl>
</li>
</ul>
<a id="setGroupRoleAttribute(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setGroupRoleAttribute</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setGroupRoleAttribute&#8203;(java.lang.String&nbsp;groupRoleAttribute)</pre>
</li>
</ul>
<a id="setGroupSearchFilter(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setGroupSearchFilter</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setGroupSearchFilter&#8203;(java.lang.String&nbsp;groupSearchFilter)</pre>
</li>
</ul>
<a id="setRolePrefix(java.lang.String)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setRolePrefix</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setRolePrefix&#8203;(java.lang.String&nbsp;rolePrefix)</pre>
<div class="block">Sets the prefix which will be prepended to the values loaded from the directory.
Defaults to "ROLE_" for compatibility with <tt>RoleVoter</tt>.</div>
</li>
</ul>
<a id="setSearchSubtree(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setSearchSubtree</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setSearchSubtree&#8203;(boolean&nbsp;searchSubtree)</pre>
<div class="block">If set to true, a subtree scope search will be performed. If false a single-level
search is used.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>searchSubtree</code> - set to true to enable searching of the entire tree below the
<tt>groupSearchBase</tt>.</dd>
</dl>
</li>
</ul>
<a id="setIgnorePartialResultException(boolean)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setIgnorePartialResultException</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setIgnorePartialResultException&#8203;(boolean&nbsp;ignore)</pre>
<div class="block">Sets the corresponding property on the underlying template, avoiding specific
issues with Active Directory.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>LdapTemplate.setIgnoreNameNotFoundException(boolean)</code></dd>
</dl>
</li>
</ul>
<a id="setAuthorityMapper(java.util.function.Function)">

</a>
<ul class="blockList">
<li class="blockList">
<h4>setAuthorityMapper</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAuthorityMapper&#8203;(java.util.function.Function&lt;java.util.Map&lt;java.lang.String,&#8203;java.util.List&lt;java.lang.String&gt;&gt;,&#8203;<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core">GrantedAuthority</a>&gt;&nbsp;authorityMapper)</pre>
<div class="block">Sets the mapping function which will be used to create instances of
<a href="../../core/GrantedAuthority.html" title="interface in org.springframework.security.core"><code>GrantedAuthority</code></a> given the context record.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>authorityMapper</code> - the mapping function</dd>
</dl>
</li>
</ul>
<a id="getLdapTemplate()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getLdapTemplate</h4>
<pre class="methodSignature">protected&nbsp;<a href="../SpringSecurityLdapTemplate.html" title="class in org.springframework.security.ldap">SpringSecurityLdapTemplate</a>&nbsp;getLdapTemplate()</pre>
<div class="block">Returns the current LDAP template. Method available so that classes extending this
can override the template used</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the LDAP template</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../SpringSecurityLdapTemplate.html" title="class in org.springframework.security.ldap"><code>SpringSecurityLdapTemplate</code></a></dd>
</dl>
</li>
</ul>
<a id="getGroupRoleAttribute()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroupRoleAttribute</h4>
<pre class="methodSignature">protected final&nbsp;java.lang.String&nbsp;getGroupRoleAttribute()</pre>
<div class="block">Returns the attribute name of the LDAP attribute that will be mapped to the role
name Method available so that classes extending this can override</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the attribute name used for role mapping</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultLdapAuthoritiesPopulator.html#setGroupRoleAttribute(java.lang.String)"><code>setGroupRoleAttribute(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="getGroupSearchFilter()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getGroupSearchFilter</h4>
<pre class="methodSignature">protected final&nbsp;java.lang.String&nbsp;getGroupSearchFilter()</pre>
<div class="block">Returns the search filter configured for this populator Method available so that
classes extending this can override</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the search filter</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultLdapAuthoritiesPopulator.html#setGroupSearchFilter(java.lang.String)"><code>setGroupSearchFilter(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="getRolePrefix()">

</a>
<ul class="blockList">
<li class="blockList">
<h4>getRolePrefix</h4>
<pre class="methodSignature">protected final&nbsp;java.lang.String&nbsp;getRolePrefix()</pre>
<div class="block">Returns the role prefix used by this populator Method available so that classes
extending this can override</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the role prefix</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultLdapAuthoritiesPopulator.html#setRolePrefix(java.lang.String)"><code>setRolePrefix(String)</code></a></dd>
</dl>
</li>
</ul>
<a id="isConvertToUpperCase()">

</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isConvertToUpperCase</h4>
<pre class="methodSignature">protected final&nbsp;boolean&nbsp;isConvertToUpperCase()</pre>
<div class="block">Returns true if role names are converted to uppercase Method available so that
classes extending this can override</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if role names are converted to uppercase.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="DefaultLdapAuthoritiesPopulator.html#setConvertToUpperCase(boolean)"><code>setConvertToUpperCase(boolean)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>

<footer role="contentinfo">
<nav role="navigation">

<div class="bottomNav"><a id="navbar.bottom">

</a>
<div class="skipNav"><a href="DefaultLdapAuthoritiesPopulator.html#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">

</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="DefaultLdapAuthoritiesPopulator.html#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">

</a></div>

</nav>
</footer>
<script>if (window.parent == window) {(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-2728886-23', 'auto', {'siteSpeedSampleRate': 100});ga('send', 'pageview');}</script><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194" integrity="sha512-Gi7xpJR8tSkrpF7aordPZQlW2DLtzUlZcumS8dMQjwDHEnw9I7ZLyiOj/6tZStRBGtGgN6ceN6cMH8z7etPGlw==" data-cf-beacon='{"rayId":"7040d8f988fe980c","token":"bffcb8a918ae4755926f76178bfbd26b","version":"2021.12.0","si":100}' crossorigin="anonymous"></script>
</body>
</html>
